package com.wxproject.demo.Utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import java.text.SimpleDateFormat;
import java.util.Date;

@Data
@AllArgsConstructor
public class DateUtils {
    private Date date;
    //yyyy-MM-dd HH:mm:ss
    public static String getDate(){
        String date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
        return date;
    }
    //yyyy-MM-dd
    public static String getDateShort(){
        String date = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
        return date;
    }

    //yyyy-MM-dd HH:mm
    public static String getMinutesDate(){
        String date = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date());
        return date;
    }
}
